﻿@model IEnumerable<NewCity.Models.StoryCard>

@{
    ViewData["Title"] = "StoryCard";
}

<h2>Index</h2>

<p>
    <a asp-controller="Main" asp-action="Index" asp-route-StorySeriesID="@ViewBag.ID">Start this story</a>
</p>
<table class="table">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.StoryName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Text)
            </th>
            
            <th>
                @Html.DisplayNameFor(model => model.BackgroundIMG)
            </th>
            <th>
                option
            </th>
        </tr>
    </thead>
    <tbody>
@foreach (var item in Model) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.StoryName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Text)
            </td>
            
            <td>
                @Html.DisplayFor(modelItem => item.BackgroundIMG)
            </td>
            <td>
                @foreach(StoryOption option in item.StoryOptions)
                {
                   <div>
                       @option.Text
                       ||
                       @option.ID.ToString()
                   </div>
                }

                
            </td>
        </tr>
}

      
    </tbody>


</table>
